@charset "UTF-8";
.box {
  background-image: url("../../images/border.png");
  background-size: 100% 100%;
  position: absolute;
  width: 100%;
  height: 80%;
  top: 4%;
  z-index: 120;
}

.danmaku-system {
  max-width: 1000px;
  margin: 0 auto;
  border-radius: 15px;
  padding: 25px;
}

.video-container {
  margin-bottom: 30px;
  border-radius: 10px;
  overflow: hidden;
}

.video-wrapper {
  position: relative;
  width: 100%;
}

video {
  display: block;
  width: 100%;
  height: auto;
}

.danmaku-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 10;
}

.danmaku-item {
  position: absolute;
  white-space: nowrap;
  font-size: 24px;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  will-change: transform;
  transition: transform 0.1s linear;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.danmaku-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.resume-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  z-index: 1000;
  transition: all 0.3s ease;
}

.resume-button:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: translate(-50%, -50%) scale(1.05);
}

.operation-tips {
  margin-top: 16px;
  padding: 12px;
  background: rgba(24, 144, 255, 0.1);
  border: 1px solid rgba(24, 144, 255, 0.2);
  border-radius: 6px;
}

.operation-tips p {
  margin: 0;
  color: #1890ff;
  font-size: 14px;
  text-align: center;
}

.danmaku-actions {
  display: none;
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  border-radius: 4px;
  padding: 4px;
  gap: 4px;
  z-index: 1000;
}

.danmaku-actions button {
  border: none;
  background: transparent;
  color: white;
  padding: 2px 6px;
  border-radius: 2px;
  cursor: pointer;
  font-size: 12px;
}

.danmaku-actions button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.danmaku-actions .edit-btn {
  color: #1890ff;
}

.danmaku-actions .delete-btn {
  color: #ff4d4f;
}

.danmaku-item:hover .danmaku-actions,
.danmaku-item[data-editing="true"] .danmaku-actions {
  display: flex;
}

.edit-input {
  background: rgba(0, 0, 0, 0.9);
  border: 2px solid #1890ff;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 16px;
  width: 250px;
  outline: none;
  box-shadow: 0 0 10px rgba(24, 144, 255, 0.3);
}

.edit-input:focus {
  border-color: #40a9ff;
  box-shadow: 0 0 15px rgba(24, 144, 255, 0.5);
}

.edit-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.edit-confirm,
.edit-cancel {
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  margin-left: 8px;
  font-weight: bold;
  transition: all 0.2s ease;
}

.edit-confirm {
  background: #52c41a;
  color: white;
}

.edit-confirm:hover {
  background: #73d13d;
  transform: translateY(-1px);
}

.edit-cancel {
  background: #ff4d4f;
  color: white;
}

.edit-cancel:hover {
  background: #ff7875;
  transform: translateY(-1px);
}

.danmaku-item[data-editing="true"] {
  z-index: 1000 !important;
  background: rgba(0, 0, 0, 0.8) !important;
  border: 2px solid #1890ff !important;
  border-radius: 8px !important;
  padding: 8px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
  pointer-events: auto !important;
}

.danmaku-item[data-editing="true"] .danmaku-actions {
  display: none !important;
}

.danmaku-item[data-editing="true"] .danmaku-content {
  display: none !important;
}

.scroll {
  /* 滚动弹幕默认在右侧准备 */
  left: 100%;
}

.top {
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
}

.bottom {
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
}

@keyframes danmaku-move {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-120vw);
    /* 让弹幕完全滑出屏幕 */
  }
}

.context-menu {
  position: fixed;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 100;
  padding: 4px 0;
  min-width: 120px;
  color: white;
}

.menu-item {
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.wechat {
  background: #ccc;
  position: absolute;
  left: 90%;
  top: 130%;
  width: 45px;
  height: 45px;
  border-radius: 50%;
}
